<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%--JSP头部复用--%>
<jsp:include page="common/head.jsp" flush="true"></jsp:include>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-4">
            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
                <form action="/addUser" method="post">
                    <div class="form-group">
                        <label for="userCode">用户编码</label>
                        <input type="text" class="form-control" id="userCode" name="userCode" aria-describedby="emailHelp"  style="width: 210%" required>
                    </div>
                    <div class="form-group">
                        <label for="userName">姓名</label>
                        <input type="text" class="form-control" id="userName" name="userName"  style="width: 210%" required>
                    </div>

                    <div class="form-group">
                        <label for="userPassword">密码</label>
                        <input type="text" class="form-control" id="userPassword" name="userPassword"  style="width: 210%" required>
                    </div>

                    <label>性别:</label>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="gender" value="1" checked />
                        <label class="form-check-label" >男</label>
                    </div>
                    <div class="form-check form-check-inline">
                        <input class="form-check-input" type="radio" name="gender" value="2">
                        <label class="form-check-label" >女</label>
                    </div>

                    <div class="form-group">
                        <label for="birthday">出生日期</label>
                        <input type="date" class="form-control" id="birthday" name="birthday"  style="width: 210%" required>
                    </div>
                    <div class="form-group">
                        <label for="phone">联系电话</label>
                        <input type="text" class="form-control" id="phone" name="phone"  style="width: 210%" required>
                    </div>
                    <div class="form-group">
                        <label for="address">地址</label>
                        <input type="text" class="form-control" id="address" name="address" style="width: 210%" required>
                    </div>
                    <div class="form-group">
                        <select class="custom-select" name="userRole" required>
                            <option selected value="0">请选择职位</option>
                            <option value="1">管理员</option>
                            <option value="2">经理</option>
                            <option value="3">普通员工</option>
                        </select>
                    </div>
                    <br>
                    <button type="submit" class="btn btn-primary">确认添加</button>
                    <a type="button" class="btn btn-warning" href="/userList">放弃添加</a>
                </form>
            </div>
        </main>

    </div>
</div>
</body>
</html>
